
cat $1 |
    sed 's/<\([^>]*\)\(TABLE\)[^>]*>/<\1table>/g' |
    sed 's/<\([^>]*\)\(STRONG\)[^>]*>/<\1strong>/g' | 
    sed 's/<\([^>]*\)\(TR\)[^>]*>/<\1tr>/g' |
    sed 's/<\([^>]*\)\(TH\)[^>]*>/<\1th>/g' |
    sed 's/<\([^>]*\)\(TD\)[^>]*>/<\1td>/g' |
    sed 's/<\([^>]*\)\(TT\)[^>]*>/<\1tt>/g' |
    sed 's/<\([^>]*\)\(UL\)[^>]*>/<\1ul>/g' | 
    sed 's/<\([^>]*\)\(LI\)[^>]*>/<\1li>/g' | 
    sed 's/<A HREF=/<a href=/g' | 
    sed 's/<.A>/<\/a>/g' |
    sed 's/<\([^>]*\)\(COL\)[^>]*>//g' |
    sed 's/<\([^>]*\)\(P\)[^>]*>//g' > $1.table
